package com.hehui.module.customer.service;

import com.hehui.common.core.commom.TreeSelect;
import com.hehui.module.customer.entity.CustomLocale;


import java.util.List;

public interface ICustomLocaleService {
    //根据ID查询节点信息
    public CustomLocale selectCustomLocaleById(Long localeId);

    //添加节点信息
    public int insertCustomLocale(CustomLocale customLocale);

    //修改节点信息
    public int updateCustomLocale(CustomLocale customLocale);

    //根据ID删除节点
    public int deleteCustomLocaleById(Long localeId);

    //根据 ID查询是否存在子节点  如果有子节点 return true
    public boolean hasChildByCustomLocaleById(Long localeId, Long merchantId);

    //根据ID查询 该节点下有没有用户  如果节点下有用户 return true
    public boolean checkCustomLocaleExistCustomer(Long localeId, Long merchantId);

    //查询归属地全部数据
    public List<CustomLocale> selectAllCustomLocale(CustomLocale customLocale);

    //构建前端所需的树结构
    public List<CustomLocale> buildCustomLocaleTree(List<CustomLocale> customLocales);

    //构建前端所需要的下拉结构
    public List<TreeSelect> buildCustomLocaleTreeSelect(List<CustomLocale> customLocales);

    //根据ID查询所有子节点信息
    public List<CustomLocale> selectChildrenCustomLocaleById(Long localeId);
    //根据节点名查询节点是否存在
    public boolean checkCustomLocaleNameUnique(String name,Long merchantId);
    //校验节点编号的唯一性
    public boolean checkCustomLocaleNumUnique(String num,Long merchantId);
    //生成新的编号
    public String createNewNum(Long merchantId);
  



}
